package com.pwt.entity;

import io.swagger.v3.oas.annotations.media.Schema;
import com.pwt.entity.base.BaseEntity;
import javax.persistence.*;
import lombok.EqualsAndHashCode;
import lombok.Data;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import java.util.List;


/**
 * 机床hierarchy配置保存表
 *
 * @author auto generated
 * @date 2021-10-08 11:30:48
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Entity
@Table(name = "[hierarchy]")
@Schema(name = "机床hierarchy配置保存表")
@DynamicInsert
@DynamicUpdate
public class Hierarchy extends BaseEntity {

	/**
	 * 编号
	 * nullable : true
	 * default  : null
	 */
	@Schema(name = "number",description = "编号")
	@Column(name = "number", nullable = true)
	private Integer number;

	/**
	 * 名称
	 * nullable : true
	 * default  : null
	 */
	@Schema(name = "name",description = "名称")
	@Column(name = "name", nullable = true, length = 64)
	private String name;

	/**
	 * 名称
	 * nullable : true
	 * default  : null
	 */
	@Schema(name = "numberName",description = "名称编号")
	@Column(name = "numberName", nullable = true, length = 64)
	private String numberName;

	/**
	 * 父级id
	 * nullable : true
	 * default  : null
	 */
	@Schema(name = "pid",description = "父级id")
	@Column(name = "pid", nullable = true, length = 32)
	private String pid;

	/**
	 * 父级id
	 * nullable : true
	 * default  : null
	 */
	@Schema(name = "abilityLineId",description = "能力-生产线id")
	@Column(name = "abilityLineId", nullable = true, length = 32)
	private String abilityLineId;


	@Transient
	@Schema(name = "hierarchyList",description = "子集合")
	private List<Hierarchy> children;
}
